<form class="form-horizontal" name="horizontal" >
		<div class="row">
			<div class="col-lg-12">
			<div class="ibox-content">
				<div class="form-group">
					<label class="col-sm-2 control-label" ng-show="baseInfo.id!=null">id：</label>
					<div class="col-sm-2 checkbox" ng-show="baseInfo.id!=null" ng-bind="baseInfo.id">
					</div>
					<label class="col-sm-2 control-label"><i class="red_req">*</i>状态：</label>
					<div class="col-sm-2">
						<select  class="form-control" ng-model="baseInfo.status" ng-options="x.value as x.text for x in status">
			            </select>
					</div>
					<label class="col-sm-2 control-label"><i class="red_req">*</i>智能匹配：</label>
					<div class="col-sm-2">
						<select  class="form-control" ng-model="baseInfo.aiMatching" ng-options="x.value as x.text for x in aiMatchingSelect">
						</select>
					</div>
				</div>
				<div class="form-group" ng-show="baseInfo.aiMatching == 1">
					<div class="ibox float-e-margins">
						<div class="ibox-title">
							<h5>地区映射设置</h5>
						</div>
						<div class="ibox-content">
							<div class="col-sm-10" style="text-align:center">
								<button class="btn btn-primary5 btn-mr20" type="button" ng-click='accountAddressShow(1)'>新增</button>
								<button class="btn btn-new btn-mr20" type="button" ng-click='importAMShow()'>导入</button>
								<button class="btn btn-primary7 btn-mr20" type="button" ng-show="baseInfo.id!=null" ng-click="addressMappingExport()">导出</button>
								<a href="jumpRoute/downloadAddressMappingTemplate">导入模板下载</a>
							</div>
							<div class="form-group">
								<div class="gridStyle" ui-grid="accountAddressGrid" ui-grid-resize-columns></div>
							</div>
						</div>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label"><i class="red_req">*</i>跳转目标路由集群：</label><!-- style="width: 100%" chosen chosen-data="groupList"  chosen-keyup="getStates" -->
					<div class="col-sm-5">
						<select class="form-control" name="groupCode" required style="width: 100%" chosen required
							 ng-model='baseInfo.groupCode' ng-options="x.groupCode as x.groupName for x in groupList"  ng-disabled="baseInfo.id!=null">
						</select>
						<div class="req_mesg" ng-show="horizontal.groupCode.$dirty && horizontal.groupCode.$invalid">
							<span ng-show="horizontal.groupCode.$error.required">路由集群不能为空</span>
						</div>
					</div>
				</div>
				<div class="form-group">
				    <label class="col-sm-2 control-label"><i class="red_req">*</i>生效日期：</label>
				    <div class="col-sm-2">
				        <select class="form-control" ng-model="baseInfo.effectiveDateType" ng-options="x.value as x.text for x in effectiveDateTypeList"></select>
				    </div>
                </div>
				<div class="form-group" ng-show="baseInfo.effectiveDateType==4">
					<label class="col-sm-2 control-label"><i class="red_req">*</i>开始生效日期：</label>
					<div class="col-sm-2">
						<input type="datetime" ng-disabled="false"  class="form-control" style="width:auto;display:inline-block;"
						  date-time name="startDate" ng-model="baseInfo.startDate" date-change="changeMinMax"
						  max-date="maxDate"  view="date"  min-view="date" format="YYYY-MM-DD"
						  ng-required="baseInfo.effectiveDateType==4">
						  <div class="req_mesg" ng-show="horizontal.startDate.$dirty && horizontal.startDate.$invalid">
                          							<span ng-show="horizontal.startDate.$error.required">开始生效日期不能为空</span>
                          						</div>
					</div>
					<label class="col-sm-2 control-label"><i class="red_req">*</i>截止生效日期：</label>
					<div class="col-sm-2">
						<input type="datetime" ng-disabled="false"  class="form-control" style="width:auto;display:inline-block;"
						  date-time name="endDate" ng-model="baseInfo.endDate" date-change="changeMinMax"
						   max-date="maxDate"  view="date"  min-view="date" format="YYYY-MM-DD"
						   ng-required="baseInfo.effectiveDateType==4">
						   <div class="req_mesg" ng-show="horizontal.endDate.$dirty && horizontal.endDate.$invalid">
                           							<span ng-show="horizontal.endDate.$error.required">截止生效日期不能为空</span>
                           						</div>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label"><i class="red_req">*</i>每天生效时间：</label>
					<div class="col-sm-2">
					<div class="input-group " clock-picker data-autoclose="true">
		                <input type="text" class="form-control" name="startTime" ng-model="baseInfo.startTime" required>
		                <span class="input-group-addon">
		                    <span class="fa fa-clock-o"></span>
		                </span>
		                <div class="req_mesg" ng-show="horizontal.startTime.$dirty && horizontal.startTime.$invalid">
							<span ng-show="horizontal.startTime.$error.required">生效时间不能为空</span>
						</div>
		            </div>
		        	</div> 
					<label class="col-sm-2 control-label"><i class="red_req">*</i>每天截止时间：</label>
					<div class="col-sm-2">
					<div class="input-group " clock-picker data-autoclose="true">
		                <input type="text" class="form-control" name="endTime" ng-model="baseInfo.endTime" required>
		                <span class="input-group-addon">
		                    <span class="fa fa-clock-o"></span>
		                </span>
		                <div class="req_mesg" ng-show="horizontal.endTime.$dirty && horizontal.endTime.$invalid">
							<span ng-show="horizontal.endTime.$error.required">截止时间不能为空</span>
						</div>
		            </div>
		       	 </div> 
				</div>
			    <div class="form-group">
					<label class="col-sm-2 control-label"><i class="red_req">*</i>交易最小金额：</label>
					<div class="col-sm-2">
						<input type="text" class="form-control" name="minTransAmount" ng-model="baseInfo.minTransAmount" ng-pattern="/^(([1-9]\d{0,9}))(\.\d{1,2})?$/" required >
						<div class="req_mesg" ng-show="horizontal.minTransAmount.$dirty && horizontal.minTransAmount.$invalid">
							<span ng-show="horizontal.minTransAmount.$error.required">交易最小金额不能为空</span>
							<span ng-show="horizontal.minTransAmount.$error.pattern">金额格式不正确</span>
						</div>
					</div>
					<label class="col-sm-2 control-label"><i class="red_req">*</i>交易最大金额：</label>
					<div class="col-sm-2">
						<input type="text" class="form-control" name="maxTransAmount" ng-model="baseInfo.maxTransAmount" ng-pattern="/^(([1-9]\d{0,9}))(\.\d{1,2})?$/" required >
						<div class="req_mesg" ng-show="horizontal.maxTransAmount.$dirty && horizontal.maxTransAmount.$invalid">
							<span ng-show="horizontal.maxTransAmount.$error.required">交易最大金额不能为空</span>
							<span ng-show="horizontal.maxTransAmount.$error.pattern">金额格式不正确</span>
						</div>
					</div>
				</div>
				<div class="form-group">
                    <label class="col-sm-2 control-label">目标金额：</label>
                    <div class="col-sm-2">
                        <input type="text" class="form-control" name="targetAmount" ng-model="baseInfo.targetAmount" ng-pattern="/^((0)|([1-9]\d{0,9}))(\.\d{1,2})?$/"  >
                        <div class="req_mesg" ng-show="horizontal.targetAmount.$dirty && horizontal.targetAmount.$invalid">
                            <span ng-show="horizontal.targetAmount.$error.pattern">目标金额格式不正确</span>
                        </div>
                    </div>
                </div>
				 <div class="form-group">
					<label class="col-sm-2 control-label">跳转次数：</label>
					<div class="col-sm-2">
						<input type="number" ng-disabled="true"  class="form-control" name="jumpTimes"  ng-model="baseInfo.jumpTimes">
					</div>
					<label class="col-sm-2 control-label">相隔天数：</label>
					<div class="col-sm-2">
						<input type="number" ng-disabled="true"  class="form-control"  name="apartDays" ng-model="baseInfo.apartDays">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label"><i class="red_req">*</i>卡类型：</label>
					<div class="col-sm-2">
						<select class="form-control" ng-model='baseInfo.cardType' ng-change="changeCardType()" ng-options="x.value as x.text for x in cardType"  >
						</select>
					</div>
					<label class="col-sm-2 control-label"><i class="red_req">*</i>收单机构：</label>
					<div class="col-sm-2">
						<select class="form-control"  name="acqId" ng-model='baseInfo.acqId' ng-change="setAcqMerchantShowState()" ng-options="x.id as x.acqName for x in acqList" required >
						</select>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">备注：</label>
					<div class="col-sm-8">
						<input type="text" class="form-control" ng-model="baseInfo.remark">
					</div>
				</div>
				
				<div class="form-group">
					<label class="col-sm-2 control-label"><i class="red_req">*</i>业务产品：</label>
					<div class="col-sm-2">
                        <select class="form-control" ng-model='baseInfo.bpType' ng-options="x.value as x.text for x in bpTypeList"  >
                        </select>
                    </div>
				</div>

				<div class="form-group">
                    <label class="col-sm-2 control-label"></label>
                    <div class="col-sm-3">
                        <div class="gridStyle" ui-grid="teamGrid" ui-grid-selection ui-grid-resize-columns class="grid"></div>
                    </div>
                    <div class="col-sm-3">
                        <div class="gridStyle" ui-grid="bpGrid" ui-grid-selection ui-grid-resize-columns class="grid"></div>
                    </div>
                </div>

				<div class="form-group">
                    <label class="col-sm-2 control-label"><i class="red_req">*</i>商户省份：</label>
                    <div class="col-sm-2">
                        <select class="form-control" ng-model='baseInfo.provinceType' ng-change="initTree()" ng-options="x.value as x.text for x in provinceTypeList"  >
                        </select>
                    </div>
					<label class="col-sm-2 control-label"><i class="red_req">*</i>是否关联活动：</label>
					<div class="col-sm-2">
						<select class="form-control" ng-model='baseInfo.relationActivity' ng-options="x.value as x.text for x in relationActivitySelect" ng-change="testChange()" >
						</select>
					</div>
                </div>

				<div class="form-group" ng-show="baseInfo.provinceType != 0">
					<label class="control-label col-sm-2"></label>
					<div class="col-sm-7">
						<div style="height:300px;overflow:scroll;">
							<select id="provinceCity-treeMultiselect">
								<option ng-repeat="(index,x) in getProvinceCityMultiselectList" value="{{x.value}}" ng-selected="{{x.isSelected}}" data-section="{{x.text}}">{{x.value}}</option>
							</select>
						</div>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label"><i class="red_req">*</i>服务类型：</label>
					<div class="col-sm-2">
						<select class="form-control" ng-model='baseInfo.serviceTypeSelect' ng-change='changeServiceTypeSelect()'  ng-options="x.value as x.text for x in serviceTypeSelectList"  >
						</select>
					</div>
					<div ng-show="cardServiceTypeStatus">
						<label class="col-sm-2 control-label"><i class="red_req">*</i>刷卡标准类型：</label>
						<div class="col-sm-2">
					</div>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label" ng-class="serviceTypeClass"></label>
					<div class="col-sm-3" ng-show="baseInfo.serviceTypeSelect!='0'">
						<div class="gridStyle" ui-grid="serviceTypeGrid" ui-grid-selection ui-grid-resize-columns class="grid"></div>
					</div>
					<div ng-show="cardServiceTypeStatus">
						<label class="control-label"></label>
						<div class="col-sm-3">
							<div class="gridStyle" ui-grid="cardServiceTypeGrid" ui-grid-selection ui-grid-resize-columns class="grid"></div>
						</div>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label"><i class="red_req">*</i>发卡行：</label>
					<div class="col-sm-2">
						<select class="form-control" ng-model='baseInfo.cardBinType' ng-change="changeCardType()" ng-options="x.value as x.text for x in cardBinList"  >
						</select>
					</div>
					<div ng-show="baseInfo.acqMerchantShowState==1">
						<label class="col-sm-2 control-label"><i class="red_req">*</i>指定行业:</label>
						<div class="col-sm-2">
							<select class="form-control" ng-model='baseInfo.acqMerchantState'  ng-options="x.value as x.text for x in acqMerchantList"  >
							</select>
						</div>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label"></label>
					<div class="col-sm-3" ng-show="baseInfo.cardBinType!=0">
						<div class="gridStyle" ui-grid="cardBinGrid" ui-grid-selection ui-grid-resize-columns class="grid"></div>
					</div>
					<label class="control-label" ng-class="acqMerchantClass"></label>
					<div class="col-sm-3" ng-show="baseInfo.acqMerchantState!=0">
						<div class="gridStyle" ui-grid="acqMerchantGrid" ui-grid-selection ui-grid-resize-columns class="grid"></div>
					</div>
				</div>
				<!--
				<div class="form-group">
					<label class="col-sm-2 control-label">每周重复：</label>
					<div class="col-sm-4">
					
						<label><input type="checkbox" ng-disabled="true" ng-model='baseInfo.monday'  ng-true-value="0" ng-false-value="-1"/>周一 </label> 
						<label><input type="checkbox" ng-disabled="true"  ng-model="baseInfo.tuesday" ng-true-value="1" ng-false-value="-1" />周二 </label> 
						<label><input type="checkbox" ng-disabled="true"  ng-model="baseInfo.wednesday" ng-true-value="2" ng-false-value="-1" />周三 </label> 
						<label><input type="checkbox" ng-disabled="true"  ng-model="baseInfo.thursday" ng-true-value="3" ng-false-value="-1" />周四 </label> 
						<label><input type="checkbox" ng-disabled="true"  ng-model="baseInfo.friday" ng-true-value="4" ng-false-value="-1" />周五 </label> 
						<label><input type="checkbox" ng-disabled="true"  ng-model="baseInfo.saturday" ng-true-value="5" ng-false-value="-1" />周六 </label> 
						<label><input type="checkbox" ng-disabled="true"  ng-model="baseInfo.sunday" ng-true-value="6" ng-false-value="-1" />周日 </label> 
					</div>
				</div>
				-->
				<div class="form-group">
					<label class="col-sm-2 control-label"></label>
					<div class="col-sm-8">
						<input type="button" class="btn btn-primary btn-mr20" ng-disabled="horizontal.$invalid|| submitting
							|| (baseInfo.bpType==1 && bpGridApi.selection.getSelectedRows().length==0)
							||(baseInfo.cardBinType==1 && cardBinGridApi.selection.getSelectedRows().length==0)
							||(baseInfo.acqMerchantState==1 && acqMerchantGridApi.selection.getSelectedRows().length==0)
							|| (baseInfo.provinceType==1 && provinceGridApi.selection.getSelectedRows().length==0)" ng-click="submit()" value='提交'>
						<input type="button" class="btn btn-primary4 btn-mr20" ui-sref="org.jumpRoute" value='返回'>
					</div>
				</div>
			</div>
		</div>
		</div>
	</form>


<form class="form-horizontal" name="horizontalAccountAddressAdd" novalidate>
	<div id="accountAddressAdd" class="modal fade" tabindex="-2" role="dialog">
		<div class="modal-dialog" style="width: 900px">
			<div class="modal-content">
				<div class="modal-body">
					<div class="form-group">
						<label class="col-sm-3 control-label"><i class="red_req">*</i>商户注册地：</label>
						<div class="col-sm-3">
							<select class="form-control" ng-model='accountAreaAddInfo.province' ng-change="provinceChannge()" ng-options="x.text as x.text for x in allProvinceSelect"  >
							</select>
						</div>
						<div class="col-sm-3">
							<select class="form-control" ng-model='accountAreaAddInfo.city' ng-options="x.text as x.text for x in allCitySelect"  >
							</select>
						</div>
					</div>
					<div ng-repeat="item in addressGroup">
						<div class="form-group">
							<label class="col-sm-3 control-label">映射地{{$index + 1}}：</label>
							<div class="col-sm-3">
								<select class="form-control" ng-model='accountAreaAddInfo.addressMapping[$index].province' ng-change="provinceChanngeMapping($index)" ng-options="x.text as x.text for x in allProvinceMappingSelect[$index]"  >
								</select>
							</div>
							<div class="col-sm-3">
								<select class="form-control" ng-model='accountAreaAddInfo.addressMapping[$index].city' ng-options="x.text as x.text for x in allCityMappingSelect[$index]"  >
								</select>
							</div>
							<label class="col-sm-1 control-label"></label>
							<div class="col-sm-1">
								<input hidden ng-model="item.index" value="$index">
								<a  ng-if="$index == 0" ng-click="addAddressGroup($index)">增加</a><a ng-if="$index != 0" ng-click="deleteAddressGroup($index)" style="color: red;">删除</a><br />
							</div>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label"><i class="red_req">*</i>不参与集群轮循：</label>
						<div class="col-sm-2">
							<select class="form-control" ng-model='accountAreaAddInfo.joinAreaPolling' ng-options="x.value as x.text for x in joinGroupPollingStatus"></select>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label"></label>
						<div class="col-sm-6">
							<button class="btn btn-primary btn-mr20" type="button" ng-click='addAccountAddressMapping()'
									id="btnSubmit1" ng-disabled="horizontalAccountAreaAdd.$invalid">保存
							</button>
							<button class="btn btn-primary8 btn-mr20" type="button" ng-click='accountAddressMappingCancel()'>取消</button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	</div>
</form>

<style>
	div.tree-multiselect div.title {
		background: #ffffff;
		color: black;
	}

	div.tree-multiselect span.remove-selected, div.tree-multiselect span.description {
		background: #ffffff;
		color: black;
	}
</style>

<!-- add import -->
<form class="form-horizontal" id="form2" name="horizontalAdd" novalidate>
	<div id="importAM" class="modal fade" tabindex="-1" role="dialog">
		<div class="modal-dialog" style="width: 900px">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" ng-click='importAMCancel()'>
						&times;
					</button>
					<h3 class="modal-title">映射地区导入</h3>
				</div>
				<div class="modal-body">
					<div class="form-group">
						<label class="col-sm-2 control-label">导入文件：</label>
						<div class="col-sm-3 checkbox ">
							<input type="file" nv-file-select="" ng-model="fileSelect" uploader="uploader" multiple/>
							<table class="table">
								<tbody>
								<tr ng-repeat="item in uploader.queue">
									<td>
										<strong>{{ item.file.name }}</strong>
									</td>
									<td nowrap>
										<button type="button" class="btn btn-danger btn-xs" ng-click="item.remove()">
											<span class="glyphicon glyphicon-trash"></span>删除
										</button>
									</td>
								</tr>
								</tbody>
							</table>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label"></label>
						<div class="col-sm-6">
							<button class="btn btn-primary btn-mr20" type="button" ng-click='importAddressMapping()'
									id="btnSubmit" ng-disabled="uploader.queue.length==0||submitting">提交
							</button>
							<button class="btn btn-primary8" type="button" ng-click='importAMCancel()'
							>取消
							</button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</form>
<!-- add -->